{extend name="common/default" /}
{block name="style"}
<style>
    img{
        max-width: 100%;
    }
    .points{
        display: inline-block;
        padding: 0 3vw;
        color: red;
        font-size: 15vw;
        border-bottom: 1rem double red;
        transform: rotate(-7deg);
        margin: 1rem;
        line-height: 16vw;
        font-family: "Times New Roman",Georgia,Serif;
        text-shadow: 3px 2px 3px #222222;
        margin-top: -1rem;
    }
    .tips-group{
        display: flex;
    }
    .tips-group .tips{
        width: 100%;
        border: 1px solid #fff;
        padding: 16px;
        text-align: center;
        background: #383838;
        color: #fff;
    }
    .tips-group .tips span{
        display: block;
    }
    .tips-group .tips span:first-child{
        color: #ff0000;
        font-size: 2rem;
        font-weight: bolder;
    }

    .weui-bar__item_on img{
        position: relative;
        left: -10000px;
        filter: drop-shadow(10000px 0 0 #07c160);
    }
    .page__hd{
        padding:16px;
    }
    .weui-btn{
        width: auto;
    }
</style>
{/block}
{block name="container"}
<div class="container">

    <div class="page js_show">
        <div class="page__bd" style="height: 100%;">
            <div class="weui-tab">
                <div class="weui-tab__panel">
                    <div class="page__hd">
                        <h1 class="page__title" style="text-align: center;">{$one.name}</h1>
                        <p class="page__desc">{$one.content}</p>
                        <div>
                            {if condition="$one['rexam_status'] eq 0"}
                            <a href="javascript:;" class="weui-btn weui-btn_disabled weui-btn_primary">开始时间：{:date('Y-m-d H:i:s',$one.starttime)}</a>
                            {elseif condition="$one['rexam_status'] eq 1" /}
                            <a href="{:addon_url('rexam/rexam/clear',['id'=>$one.id])}" class="weui-btn weui-btn_primary">点这里开始答题</a>
                            {elseif condition="$one['rexam_status'] eq 2" /}
                            <a href="{:addon_url('rexam/rexam/go',['id'=>$one.id])}" class="weui-btn weui-btn_primary">点这里继续答题</a>
                            {elseif condition="$one['rexam_status'] eq 3" /}

                            {if condition="$one['anadata'] eq 1"}
                            <a href="{:addon_url('rexam/rexam/ana',['id'=>$one.id])}" class="weui-btn weui-btn_primary">点这里查看答卷解析</a>
                            {/if}
                            <!--<a href="javascript:;" class="weui-btn weui-btn_disabled weui-btn_primary" style="width: 60%">已完成</a>-->
                            {elseif condition="$one['rexam_status'] eq 5" /}
                                {if condition="$one['anadata'] eq 1"}
                                    <a href="{:addon_url('rexam/rexam/ana',['id'=>$one.id])}" class="weui-btn weui-btn_primary">点这里查看答卷解析</a>
                                {/if}
                            {else/}
                            <a href="javascript:;" class="weui-btn weui-btn_disabled weui-btn_primary">截止时间：{:date('Y-m-d H:i:s',$one.expiretime)}</a>
                            {/if}
                        </div>
                    </div>
                    <div class="page__bd page__bd_spacing" style="text-align: center;">
                        {if condition="$one['rexam_status'] lt 3"}
                        <p><strong>开始时间：</strong>{:date('Y-m-d H:i:s',$one.starttime)}</p>
                        <p><strong>截止时间：</strong>{:date('Y-m-d H:i:s',$one.expiretime)}</p>
                        <h2>&nbsp;</h2>
                        {/if}
                        {if condition="$one['rexam_status'] eq 3"}
                        {if condition="$one['pointsdata'] eq 1"}
                        <h1><span class="points">{$points}</span></h1>
                        {/if}
                        <div class="tips-group">
                            <div class="tips">
                                <span>{$answer.question_count}</span>
                                <span>题数</span>
                            </div>
                            <div class="tips">
                                <span>{$answer.right_count}</span>
                                <span>答对</span>
                            </div>
                            <div class="tips">
                                <span>{$answer.question_count - $answer.right_count}</span>
                                <span>答错</span>
                            </div>
                        </div>
                        {/if}

                        {if condition="$one['rexam_status'] eq 5"}
                        {if condition="$one['pointsdata'] eq 1"}
                        <h1><span class="points">{$points}</span></h1>
                        {/if}
                        <div class="tips-group">
                            <div class="tips">
                                <span>{$answer.question_count}</span>
                                <span>题数</span>
                            </div>
                            <div class="tips">
                                <span>{$answer.right_count}</span>
                                <span>答对</span>
                            </div>
                            <div class="tips">
                                <span>{$answer.question_count - $answer.right_count}</span>
                                <span>答错</span>
                            </div>
                        </div>
                        {/if}
                        <img class="rexem-poster" src="{$one.posterfile|cdnurl}" title="{$one.name}"/>
                    </div>
                </div>
                <div class="weui-tabbar">
                    <div class="weui-tabbar__item weui-bar__item_on" data-url="{:addon_url('rexam/index/index')}">
                        <div style="display: inline-block; position: relative;">
                            <img src="__ADDON__/home.svg" alt="" class="weui-tabbar__icon">
                        </div>
                        <p class="weui-tabbar__label">答题</p>
                    </div>
                    <div class="weui-tabbar__item" data-url="{:addon_url('rexam/index/ranking')}">
                        <img src="__ADDON__/ranking.svg" alt="" class="weui-tabbar__icon">
                        <p class="weui-tabbar__label">排行榜</p>
                    </div>
                    <div class="weui-tabbar__item" data-url="{:addon_url('rexam/index/me')}">
                        <img src="__ADDON__/me.svg" alt="" class="weui-tabbar__icon">
                        <p class="weui-tabbar__label">我</p>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
{/block}
{block name="javascript"}{/block}
